package com.hmx.miaosha.access;


import com.hmx.miaosha.domain.MiaoshaUser;

public class UserContext {
	
	private static final ThreadLocal<MiaoshaUser> userHolder = new ThreadLocal<>();

	public static void setUser(MiaoshaUser user) {
		userHolder.set(user);
	}

	public static MiaoshaUser getUser() {
		return userHolder.get();
	}

}
